#ifndef USER_H_05042012
#define USER_H_05042012

#include <string>
#include <set>

#include "exception.hpp"


class User
{
public:
	User( const TiXmlElement* pUserElement ) throw( utils::Exception );

public:
	std::string GetName() const throw();
	std::string GetPassword() const throw();
	std::string GetAllowedCommands() const throw();

	bool CheckPassword( std::string sInput ) const throw();
	void Split( const std::string& sInput, const std::string& sRegex ) throw();
	bool CheckAvailableCommands( const std::string& sCommand ) throw( utils::Exception );
	std::string	GetAvailableCommands();

private:
	std::string m_sName;
	std::string m_sPassword;
	std::string m_sAllowedCommands;

	typedef std::set < std::string > UserSet;
	UserSet m_setCommands;

};

#endif
